package org.example.controller;

import org.example.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @Autowired
    HelloService helloService;

    @GetMapping("/hello")
    public String hello() {
        return "1111";
    }

    @GetMapping("/news")
    public String news(){
        System.out.println("####IndexController####   1");
        String a= helloService.news();
        System.out.println("####IndexController####   4");
        System.out.println(a);
        return a;
    }
}
